<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.webamc.common.enums.Fields" %>
<%@ page import="com.webamc.common.enums.Params" %>
<%@ page import="com.webamc.model.AMCOrder" %>
<%@ page import="com.webamc.util.CommonUtil" %>

<link rel="stylesheet" href="../webamc.css"/>
<div class="action-header">AMCORDER</div>

<jsp:include page="msgs.jsp"/>
<table class="browse-table" border="1">
    <col width="10%"/>
    <col width="20%"/>
    <%
        AMCOrder order = (AMCOrder) request.getAttribute(Params.BEAN);
        if (order == null) {
    %>
    No order! <a href="amcorder.html?action=browse">click here</a> to browse list.
    <%
            return;
        }
    %>

    <jsp:include page="order-view.jsp"/>

    <tr>
        <td>AMC Schedule</td>
        <td><%=CommonUtil.out(order.getAmcSchedule())%>
        </td>
    </tr>
    <tr>
        <td>Duration</td>
        <td><%=order.getTermLength()%>
        </td>
    </tr>
    <tr>
        <td>Start Date</td>
        <td><%=CommonUtil.getDateString(order.getStartTime())%>
        </td>
    </tr>


    <tr>
        <td colspan="2">
            <a href="amcorder.html?action=beforeUpdate&<%=Fields.ORDERID%>=<%=order.getOrderId()%>">
                Update
            </a>
        </td>
    </tr>
</table>
